<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0053)http://115.28.87.22:8888/base/EstPriceEdit.html?id=14 -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>项目价格 | 管理易-广告加工制作管理软件  企业版 9.28  | 易凯软件</title>
<script src="../js/minierp.js"></script>

<link rel="stylesheet" type="text/css" href="../css/base.css">
<script src="../js/popup_ext.js"></script>
<script language="javascript">
	function doSave(flag){
		document.getElementById("buttonDiv").style.display="none";
		document.getElementById("waitDiv").style.display="";
		document.getElementById("continue_flag").value=flag;
		frm.submit();
	}
	function doCancel(){
		parent.ClosePop();
	}
	function selectProduct(){
		var url="../base/ProductMainForSelect.html";
		ShowIframe("选择材料",url,900,500,"selectProductCallBack()");
	}
	function selectProductCallBack(){
		if(popRetVal!=null){
			document.getElementById("estPrice.proId").value=popRetVal[0];
			document.getElementById("estPrice.proName").value=popRetVal[2];
			document.getElementById("estPrice.unit").value=popRetVal[3];
			document.getElementById("proFlagSpan").style.display="";
		}
	}
	function selectMakeRequire(){
		var url="../base/MakeRequireListForSelect.html";
		ShowIframe("选择制作要求",url,900,500,"selectMakeRequireCallBack()");
	}
	function selectMakeRequireCallBack(){
		if(popRetVal!=null){
			var theValue="";
			for(i=0;i<popRetVal.length;i++){
				if(theValue!=null && theValue!=""){
					theValue=theValue+";";
				}
				theValue=theValue+popRetVal[i][0];
			}
			document.getElementById("estPrice.makeRequire").value=theValue;
		}
	}
	function selectUnit(){
		var url="../base/UnitListForSelect.html";
		ShowIframe("选择单位",url,300,400,"selectUnitCallBack()");
	}
	function selectUnitCallBack(){
		if(popRetVal!=null){
			document.getElementById("estPrice.unit").value=popRetVal[1];
		}
	}
	function selectMakeType(){
		var url="../base/MakeTypeListForSelect.html";
		ShowIframe("选择项目类型",url,310,500,"selectMakeTypeCallBack()");
	}
	function selectMakeTypeCallBack(){
		if(popRetVal!=null){
			document.getElementById("estPrice.makeTypeId").value=popRetVal[0];
			document.getElementById("mtName").value=popRetVal[1];
		}
	}
	
	function doSpeChange(){
		var lengthStr=document.getElementById("estPrice.length").value;
		var widthStr=document.getElementById("estPrice.width").value;
		if(lengthStr!="" && widthStr!="" && !isNaN(lengthStr) && !isNaN(widthStr)){
			document.getElementById("estPrice.specification").value=lengthStr+"m x "+widthStr+"m高";
		}
	}
	function showMe(){
		if(checkNavigator()[0]!="msie"){
			document.getElementById("attach_file").className="";
		}
		showFormErrorMsg();
	}
	function clearAttach(){
		document.getElementById("attachDelete").value="Y";
		document.getElementById("attSpan").style.display="none";
	}
	function doProNameChange(){
		document.getElementById("estPrice.proId").value="0";
		document.getElementById("proFlagSpan").style.display="none";
	}
</script>
</head>
<body oncontextmenu="return false" onload="showMe();" class="sheet modal-dialog" style=" padding-top:15px;">
<div class="sheet-main" id="bodyDiv" style="width:380px;">
	<form name="frm" method="post" enctype="multipart/form-data">
	  <div class="sheet-list" style="width:100%">
	    <div class="modal-main search-business">
	    	<div style="width:100%;">
				
				
				
<script language="javascript">
	var formErrorIndex=0;
	var formErrorMsg="";
	var formErrorObjId="";
	function setFormErrorMsg(msg,index,objId){
		if(formErrorIndex==0 || formErrorIndex>index){
			if(msg!=null && msg!=""){
				formErrorIndex=index;
				formErrorMsg=msg;
				formErrorObjId=objId;
			}
		}
	}
	function showFormErrorMsg(){
		if(formErrorIndex!=0){
			document.getElementById("errorMsgTr").style.display="";
			document.getElementById("errorMsgDiv").innerHTML=formErrorMsg;
			if(formErrorObjId!=null && formErrorObjId!=""){
				document.getElementById(formErrorObjId).focus();
			}
		}
	}
	function goNextInput(objId){
		var obj=null;
		if(objId!=null && objId!=''){
			obj=document.getElementById(objId);
		}
		if(window.event.keyCode==13){
			if(obj!=null){
				obj.focus();
			}else if(window.doSave){
				doSave();
			}
		}
	}
</script>
<h3>编辑项目价格</h3>
<table width="96%" border="0" cellpadding="0" cellspacing="0" align="center">
	<tbody><tr id="errorMsgTr" style="display:none">
	  <td colspan="2">
	  	<div class="msg-error" id="errorMsgDiv">
      	
      	</div>
	  </td>
	</tr>
</tbody></table>
				<table border="0" cellspacing="1" cellpadding="1" align="center" class="table-a">
					<tbody><tr>
				      	<th>项目类型：</th>
				      	<td>
							
							<input type="text" class="TextBox readonly" readonly="true" id="mtName" name="mtName" value="1#小方轨">
							<img class="make-a" src="../images/icon_add.gif" style="cursor:pointer;" onclick="selectMakeType();">
							<script language="javascript">
								setFormErrorMsg('',1);
							</script>
							
							
								<input type="hidden" id="estPrice.makeTypeId" name="estPrice.makeTypeId" value="58">
							
				     	</td>
					</tr>
					<tr>
				      	<th>材质：</th>
				      	<td>
							
				      		<input type="text" class="TextBox readonly" readonly="readonly" maxlength="100" id="estPrice.proName" onkeyup="goNextInput(&#39;estPrice.width&#39;);" name="estPrice.proName" value="铝型材" onchange="doProNameChange();">
				      		<img class="make-a" src="../images/icon_add.gif" style="cursor:pointer;" onclick="selectProduct();" title="价格只与项目类型相关，材质可以直接录入，也可以选择库存材料"><span class="MustInput" id="proFlagSpan" style="display:none">*</span>
							<script language="javascript">
								setFormErrorMsg('',2,'estPrice.proName');
							</script>
							
							
								<input type="hidden" id="estPrice.proId" name="estPrice.proId" value="0">
							
				     	</td>
					</tr>
					<tr>
				      	<th>宽x高：</th>
				      	<td>
							
							<input type="text" class="TextBox" style="width:40px" maxlength="10" onkeyup="goNextInput(&#39;estPrice.width&#39;);" onchange="doSpeChange();" name="estPrice.length" id="estPrice.length" value="3.6">
					        <script language="javascript">
					          	setFormErrorMsg('',3,'estPrice.length');
					        </script>
					      	
					      	x
					      	
							<input type="text" class="TextBox" style="width:40px" maxlength="10" onkeyup="goNextInput(&#39;estPrice.specification&#39;);" onchange="doSpeChange();" name="estPrice.width" id="estPrice.width" value="1">
					        <script language="javascript">
					          	setFormErrorMsg('',3,'estPrice.width');
					        </script>
					      	
				     	</td>
					</tr>
					<tr>
				      	<th>规格：</th>
				      	<td>
							
				      		<input type="text" class="TextBox" maxlength="50" id="estPrice.specification" onkeyup="goNextInput(&#39;estPrice.unit&#39;);" name="estPrice.specification" value="">
							  <script language="javascript">
								setFormErrorMsg('',4,'estPrice.specification');
							  </script>
							
				     	</td>
					</tr>
					<tr>
				      	<th>单位：</th>
				      	
				      	<td>
				      		<input type="text" class="TextBox" maxlength="10" id="estPrice.unit" onkeyup="goNextInput(&#39;priceStr&#39;);" name="estPrice.unit" value="米">
				      		<img class="make-a" src="../images/icon_add.gif" style="cursor:pointer;" onclick="selectUnit();">
							<script language="javascript">
								setFormErrorMsg('',5,'estPrice.unit');
							</script>
				     	</td>
				     	
					</tr>
					<tr>
			      		<th><span class="MustInput">*</span>单价：</th>
				      	
				      	<td>
				      		<input type="text" class="TextBox" maxlength="10" id="priceStr" onkeyup="goNextInput(&#39;estPrice.makeRequire&#39;);" name="priceStr" value="6.4800">
							  <script language="javascript">
								setFormErrorMsg('',6,'priceStr');
							  </script>
				     	</td>
				     	
					</tr>
					<tr>
				      	<th>制作要求：</th>
				      	<td>
							
				      		<textarea class="TextBox" style="width:160px;height:60px" id="estPrice.makeRequire" name="estPrice.makeRequire"></textarea>
				      		<img class="make-a" src="../images/icon_add.gif" style="cursor:pointer;" onclick="selectMakeRequire();">
							  <script language="javascript">
								setFormErrorMsg('',7,'estPrice.makeRequire');
							  </script>
							
				     	</td>
					</tr>
					<tr>
				    	<th>备注：</th> 
				    	
				    	<td>
				    		<textarea class="TextBox" style="width:160px;height:60px" id="estPrice.mark" name="estPrice.mark">3.6米/支   6.48元/米</textarea>
					          <script language="javascript">
					          	setFormErrorMsg('',8,'estPrice.mark');
					          </script>
				    	</td>
				    	
				    </tr>
				    <tr>
						<th>产品图片：</th>			    	
				    	<td>
				    		<input type="file" class="" style="width:160px" name="attach_file" id="attach_file">
							
				    	</td>
				    </tr>
				</tbody></table>
			</div>
	  	</div>
	  </div>
		<div class="modal-buttom" id="buttonDiv">
			<input type="button" class="buttom-a" value=" 保 存 " onclick="doSave(&#39;&#39;);">
			
				<input type="button" class="buttom-a" value="保存并新增" onclick="doSave(&#39;1&#39;);">
			
			<input type="button" class="buttom-a" value=" 取 消 " onclick="doCancel();">
			<input type="hidden" name="continue_flag" id="continue_flag" value="0">
			
				<input type="hidden" name="attachDelete" id="attachDelete" value="N">
			
		</div>
		<div class="modal-buttom" id="waitDiv" style="display:none">
			<span style="color:#ffffff">请稍候...</span>
		</div>
	</form>
</div>		

<span id="dialogCase"><div id="dialogBoxBG" style="position: absolute; top: 0px; left: 0px; width: 100%; height: 520px; z-index: 10001; opacity: 0.4; display: none; background-color: rgb(0, 0, 0);"></div><div id="dialogBox" style="border: 1px solid rgb(230, 239, 248); z-index: 10003; position: absolute; width: 900px; left: 204px; top: 47px; display: none;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"><tbody><tr height="24" id="dialogBoxTitleTr" bgcolor="#E6EFF8"><td><table style="-moz-user-select:none;height:24px;" width="100%" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td width="6" height="24"></td><td id="dialogBoxTitle" style="color: rgb(0, 0, 0); font-size: 14px; font-weight: bold; text-align: left; cursor: move;">选择材料&nbsp;</td><td id="dialogClose" width="20" align="right" valign="middle"><img id="dialogBoxClose" src="./dialogclose.gif" border="0" align="absmiddle" style="cursor:pointer;" title="关闭"></td><td width="6"></td></tr></tbody></table></td></tr><tr id="dialogTr" style="height:500px" valign="top"><td id="dialogBody" style="position:relative;"></td></tr></tbody></table></div><div id="dialogBoxShadow" style="z-index: 10001; position: absolute; opacity: 0.2; top: 51px; left: 208px; width: 902px; height: 526px; display: none; background: rgb(0, 0, 0);"></div></span></body></html>